Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 2 - Printing Extensions


Using Resources in Printing Extensions

You must create a number of resources that define your printing extension and provide QuickDraw GX with the information that it needs to properly load and execute the extension. The resources an extension contains are defined in a printing extension file of type 'pext'. Each printing extension file must include certain resources and may include some optional resources, as shown in Table 2-5
Table 2-5 Resource types used to define a printing extension
Resource typeCountDescription
'vers'1 or moreRecords version and compatibility information for your extension
'scop'1 or moreDefines with which devices and drivers the extension
is compatible
'eopt' 1Tells QuickDraw GX when to load the extension
'over'1-4Defines which messages your extension needs to receive
'load'1Specifies the order in which extensions are installed in the message chain
'stat'0 or moreDefines status messages for display
'plrt'0 or moreDefines printing alert messages for display
'ppnl'0 or moreDefines the contents of a panel that you are adding to a dialog box
'xdtl'0 or moreProvides information that QuickDraw GX needs to execute panel controls
'ptyp'0 or moreDefines characteristics of a paper type
.

Most of these resource types are described in the chapter "Printing Resources" in this book. The panel ('ppnl'), extended panel ('xdtl'), and paper type ('ptyp') resources are described in Inside Macintosh: QuickDraw GX Printing. This section provides examples of these resources as used in the background picture printing extension. The contents of the file backwash.r, which contains the resource definitions for the background picture printing extension, are shown in the QuickDraw GX sample code.

To avoid conflicts with resources defined by printer drivers, application programs, and Macintosh system software, the resources that you define for your printing extension must have IDs in the range 0x9600 (-27136) through 0x97FF (-26625). Most of the resources have specific ID values that you must use with them; these IDs are shown in the examples in this chapter and are defined in the resource descriptions in the chapter "Printing Resources" in this book.

All of the resources that you define for your printing extensions need to be loaded into the system heap and need to be purgeable. System resources are stored in the system heap as opposed to the application heap, where application resources are stored. Purgeable resources can be purged by the Memory Manager when space is required, as described in Inside Macintosh: Memory. You need to specify these attributes in the first
line of every resource that you define for your extensions, as is done in every resource example in this chapter.


Subtopics
Defining Code Segments in Your Printing Extension
Defining Version Compatibility for Your Printing Extension
Defining the Scope of Your Printing Extension
Optimizing the Use of Your Extension
Specifying Which Messages Your Extension Overrides
Defining the Loading Order of Your Extension

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help